home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
MUSIUSIC
/
PCORGAN.LZH
/
MUZAKE.EXE
/
MUZAK.BAS
< prev
next >
Wrap
BASIC Source File
|
1986-09-12
|
4KB
|
97 lines
10 'MUZAK.BAS By Aaron Priven V2.11 11/2/85
20 DEFINT A-Z:RESTORE:RANDOMIZE TIMER
30 PLAY"mbt120mn"
40 CLEAR: KEY OFF: OPEN "TEMP.MUZ" FOR INPUT AS #1:INPUT #1,DF$,DP$:CLOSE#1
50 CLS:LOCATE 1,1:COLOR 0,7:PRINT TAB(40-(LEN(DP$))\2) DP$ TAB(80)" ":COLOR 7,0
60 OPEN DF$ FOR INPUT AS #1:INPUT#1,N
70 DIM INK$(N),PROMPT$(N),WORDS(N),FILE$(N)
80 FOR A=1 TO N:READ INK$(A):NEXT
90 FOR A=1 TO N:INPUT#1,WORDS(A),FILE$(A),PROMPT$(A):NEXT
100 CLOSE:FOR A=1 TO N-1 STEP 2
110 LOCATE A\2+2,1
120 PRINT INK$(A);
130 PRINT " - ";PROMPT$(A);
140 LOCATE ,40
150 PRINT INK$(A+1);
160 PRINT " - ";PROMPT$(A+1)
170 NEXT A
180 IF N\2<>N/2 THEN PRINT INK$(N);" - ";PROMPT$(N)
190 LOCATE 23,1:COLOR 0,7:PRINT TAB(29);"Escape Key - End Program";TAB(80):COLOR 7,0
200 LOCATE 24,1:COLOR 0,7:PRINT TAB(18);"Enter Letter of Music or Return for New Menu";TAB(80):COLOR 7,0
210 POKE 106,0 'CLEAR KYBD BUFFER
220 K$ = INKEY$:IF K$ <> "" THEN GOTO 210
230 K$ = INKEY$:IF K$ = "" THEN GOTO 230
240 K$=MID$(K$,1,1):FLAG=0
250 IF K$<="z" AND K$>="a" THEN K$=CHR$(ASC(K$)-32)
260 FOR A=1 TO N:IF K$=INK$(A) THEN F=A:FLAG=1
270 NEXT
280 IF FLAG=0 THEN 300
290 A$=FILE$(F):IF WORDS(F)=0 THEN 490 ELSE 310
300 IF K$=CHR$(27) THEN CLS:SYSTEM ELSE IF K$=CHR$(13) THEN CLEAR:RUN 730 ELSE 210
310 OPEN A$ FOR INPUT AS #1
320 CLS:LOCATE 11,2:PRINT CHR$(213)+STRING$(76,205)+CHR$(184)
330 LOCATE 15,2:PRINT CHR$(212)+STRING$(76,205)+CHR$(190)
340 FOR K=1 TO 3
350 INPUT #1,K$:T=(80-(LEN(K$)))\2
360 LOCATE K+11,2:PRINT CHR$(179);:LOCATE K+11,T:PRINT K$;:LOCATE K+11,79:PRINT CHR$(179)
370 NEXT K
390 INPUT #1,F:DIM P$(F)
400 FOR X=1 TO F
410 INPUT #1,P$(X)
420 NEXT X
430 CLOSE:PLAY"mb"
440 FOR Y=1 TO F:PLAY P$(Y):IF INKEY$=CHR$(27) THEN RUN
450 IF Y=F-1 THEN PLAY"mf"
460 NEXT Y
470 PLAY"mfp2"
480 RUN
490 ' WITH WORDS
500 OPEN A$ FOR INPUT AS #1
510 CLS:LOCATE 11,2:PRINT CHR$(213)+STRING$(76,205)+CHR$(184)
520 LOCATE 15,2:PRINT CHR$(212)+STRING$(76,205)+CHR$(190)
530 FOR K=1 TO 3
540 INPUT #1,K$:T=(80-(LEN(K$)))\2
550 LOCATE K+11,2:PRINT CHR$(179);:LOCATE K+11,T:PRINT K$;:LOCATE K+11,79:PRINT CHR$(179)
560 NEXT K
580 INPUT #1,F:F=F*2:DIM P$(F):LOCATE 18,1
590 FOR X=1 TO F
600 INPUT #1,P$(X)
610 NEXT X
620 CLOSE:PLAY"mf"
630 FOR Y=2 TO F STEP 2
640 IF RIGHT$(P$(Y-1),1)<>"|" THEN 680
650 X=LEN(P$(Y-1))
660 X=X-1
670 PRINT LEFT$(P$(Y-1),X):GOTO 690
680 PRINT P$(Y-1);
690 PLAY P$(Y):IF INKEY$=CHR$(27) THEN RUN ELSE NEXT Y
700 PLAY"mfp2":RUN
710 'DATA FOR INK$
720 DATA A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,1,2,3,4,5,6,7,8,9,0,-,=,+,*
730 RESTORE:KEY OFF:CLS:LOCATE 1,1:COLOR 0,7:PRINT TAB(26);"MUZAK: Which Group of Songs";TAB(80)" ":COLOR 7,0
740 OPEN "DEFINTN.MUZ" FOR INPUT AS #1:INPUT#1,N
750 DIM INK$(N),PROMPT$(N),FILE$(N)
760 FOR A=1 TO N:READ INK$(A):NEXT
770 FOR A=1 TO N:INPUT#1,FILE$(A),PROMPT$(A):NEXT
780 CLOSE:FOR A=1 TO N-1 STEP 2
790 LOCATE A\2+2,1
800 PRINT INK$(A);
810 PRINT " - ";PROMPT$(A);
820 LOCATE ,40
830 PRINT INK$(A+1);
840 PRINT " - ";PROMPT$(A+1)
850 NEXT A
860 IF N\2<>N/2 THEN PRINT INK$(N);" - ";PROMPT$(N)
870 LOCATE 23,1:COLOR 0,7:PRINT TAB(28);"Escape Key - End Program";TAB(80):COLOR 7,0
880 LOCATE 24,1:COLOR 0,7:PRINT TAB(30);"Enter Letter of Music";TAB(80):COLOR 7,0
890 POKE 106,0 'CLEAR KYBD BUFFER
900 K$ = INKEY$:IF K$ <> "" THEN GOTO 900
910 K$ = INKEY$:IF K$ = "" THEN GOTO 900
920 K$=MID$(K$,1,1):FLAG=0
930 IF K$<="z" AND K$>="a" THEN K$=CHR$(ASC(K$)-32)
940 FOR A=1 TO N:IF K$=INK$(A) THEN F=A:FLAG=1
950 NEXT
960 IF FLAG=0 THEN 980
970 OPEN"TEMP.MUZ" FOR OUTPUT AS #3:WRITE#3,FILE$(F),"MUZAK: "+PROMPT$(F):CLOSE#3:RUN
980 IF K$=CHR$(27) THEN CLS:SYSTEM ELSE 890